

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    broswer = p.chromium.launch(headless=False)
    page = broswer.new_page()
    page.goto("http://www.baidu.com")
    # page.locator("#kw").fill("python自动化测试")
    # page.locator("#su").click()
    loc = page.locator("#kw").dblclick(button="right")
    page.wait_for_timeout(5000)